package cn.tedu.lbs.article.web.controller;

import cn.tedu.lbs.article.web.service.CategoryService;
import com.tarena.lbs.base.protocol.model.Result;
import com.tarena.lbs.base.protocol.pager.PageResult;
import com.tarena.lbs.pojo.content.vo.ArticleCategoryVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class CategoryController {
    @Autowired
    private CategoryService categoryService;
    @GetMapping("/admin/content/category/list")
    public Result<PageResult<ArticleCategoryVO>> list(){
        return new Result<>(categoryService.list());
    }
}
